﻿'  ******************************************
'  **        PARTIAL ENGINE CLASS          **
'  ******************************************
'  ** Protocol X 1.0.1.0 D/R Impl.         **
'  **   Compiled to /Engine.vb             **
'  **   By Razorback                       **
'  ******************************************

Partial Public Class Engine
    Private Function _Mount_X1010(ByVal filename As String, ByRef signature() As Byte, ByRef certCode() As Byte, ByRef reservedArea1() As Byte, ByRef protocolVersion() As Byte, ByVal hookSequence As MountSequence, ByRef data() As Byte, ByRef data2() As String, ByRef data3 As ULong) As Boolean
        Select Case hookSequence
            Case MountSequence.MftOffsetsValidation
                ' Convert relative offsets to absolute ones
                _packageTable._package.MftOffset += _packageTable._package.MftHashOffset + 16 + _packageTable._package.DescriptorOffset + _packageTable._package.DescriptorSize
                _packageTable._package.DataBlockOffset = _packageTable._package.MftOffset + _packageTable._package.MftSize
                _packageTable._package.MftHashOffset += _packageTable._package.DescriptorOffset + _packageTable._package.DescriptorSize
                Return False
            Case Else
                Return False ' Continue Mounting
        End Select
    End Function
End Class
